package net.ericaro.neojavagen.classes;

/**
 * <b>MethodDeclarator</b> ::= <{@link net .ericaro .neojavagen .types .Identifier Identifier}> "(" <{@link net .ericaro .neojavagen .classes .FormalParameters
 * FormalParameters}>? ")"
 * 
 * @author eric@ericaro.net
 */
public class MethodDeclarator extends net.ericaro.neojavagen.JavaPartComposition {
	private net.ericaro.neojavagen.classes.FormalParameters formalParameters;

	private net.ericaro.neojavagen.types.Identifier identifier;

	public MethodDeclarator(net.ericaro.neojavagen.types.Identifier identifier) {
		this.identifier = identifier;
		this.formalParameters = null;
	}

	public MethodDeclarator(net.ericaro.neojavagen.types.Identifier identifier, net.ericaro.neojavagen.classes.FormalParameters formalParameters) {
		super();
		this.identifier = identifier;
		this.formalParameters = formalParameters;
	}

	public net.ericaro.neojavagen.classes.FormalParameters getFormalParameters() {
		return formalParameters;
	}

	public net.ericaro.neojavagen.types.Identifier getIdentifier() {
		return identifier;
	}

	public void setFormalParameters(net.ericaro.neojavagen.classes.FormalParameters formalParameters) {
		this.formalParameters = formalParameters;
	}

	public void setIdentifier(net.ericaro.neojavagen.types.Identifier identifier) {
		this.identifier = identifier;
	}

	@Override
	public java.lang.String toString() {
		return print(identifier, "(", formalParameters, ")");
	}
}
